feat: build claude-code from source for version control#112
Merged
Conversation
- Add local claude-code package in nix/claude-code/ - Mirror upstream nixpkgs package definition - Add update.sh script to sync from nixpkgs or npm - Add nix/update command for easy dependency updates - Add GitHub Action to auto-create PRs for new versions This allows staying current with claude-code releases independent of nixpkgs update cycles. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
nhorton
approved these changes
Jan 22, 2026
- Rewrite update.sh to fetch directly from npm and compute hashes automatically using prefetch-npm-deps - Remove nixpkgs sync option (--manual flag removed) - Simplify GitHub workflow by letting the script handle version checking - Update CONTRIBUTING.md to reflect the simplified process Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nix/claude-code/mirroring upstream nixpkgsupdateshell command to update claude-code and flake inputsWhy
The nixpkgs claude-code package can lag behind npm releases. This gives us control over the version and enables automatic updates.
Files
nix/claude-code/package.nixnix/claude-code/package-lock.jsonnix/claude-code/update.shnix/update.github/workflows/update-claude-code.ymlUsage
Test plan
nix developbuilds successfullyclaude --versionreturns 2.1.15updatecommand is available in PATH🤖 Generated with Claude Code